home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / editor / xes.lha / XES / S / outline-mode.xrc < prev    next >
Text File  |  1995-08-14  |  1KB  |  17 lines

  1. # $VER: outline-mode.xrc 1.0 (14 Aug 1995)
  2. setmacro outline-mode 0 (text-mode settvar mode (Outline) settvar cr My-return settvar ftab heading-indent settvar btab roman-indent)
  3.  
  4. # Calculates the left margin ($parcol) from the outline level ($lv).
  5. setmacro calc-parcol 0 (smv m 3 add m \$lv mul m \$tabstop setparcol \$m)
  6.  
  7. setmacro roman-indent 0 (firstnb ifelse cl (set lv 3) (set lv 0) indent-outline)
  8.  
  9. setmacro heading-indent 0 (firstnb ifelse cn (set lv 2) (ifelse cl (set lv 4) (set lv 1) right if ca (dec lv) left) indent-outline)
  10. setmacro indent-outline 0 (setx while ca (col +1) subx if c=41 (add lv 3) calc-parcol add x \$parcol sub x \$tabstop setindcol \$x text-format gop col +1)
  11. setmacro format-outline 0 (firstnb while ca col +2 ifelse r (tab a-[) (wright split last tab a-[ indent-body))
  12. setmacro indent-body 0 (push pos down first while !r (pos-line \$parcol downadd first) pop pos down reformat up last join wright indent . .ct wright)
  13.  
  14. map My-return (if !t (first while !r up down) firstnb setx first while !r downadd downadd if !r (insline insline) gox)
  15.  
  16. outline-mode
  17.